// source --> https://bestkitchenworks.com/wp-content/plugins/wp-video-profits/js/mediaelement/wp-mediaelement.js?ver=1.26 // logo (function($) { MediaElementPlayer.prototype.buildlogovk = function(player, controls, layers, media) { if (vidprofits_video.logo_url && vidprofits_video.logo_url != '') { link = vidprofits_video.logo_link ? vidprofits_video.logo_link : '#'; target = vidprofits_video.logo_link ? '_blank' : '_self'; var loop = $('
') .appendTo(layers) } }; })(jQuery); /* With this, into each video on screen, we copy all the actions, so they are independent from each other */ var vp_os_vids = new Array(); vp_os_vids[0] = false; function vidprofits_add_video_to_queue( player, media ) { // console.log(player.id) // console.log(player) // console.log(jQuery(player)) mejs_id = 0; video_id = 0; campaign_id = 0; container_el = jQuery(player.container).closest('.wp-video') mejs_id = container_el.attr('data-me-id') video_id = container_el.attr('data-vidprofits-id'); if( !video_id ) campaign_id = container_el.attr('data-vcampaign-id'); // console.log(campaign_id) if( VIDPROFITS_DEBUG ) console.log('Adding video '+mejs_id+' to queue'); type = video_id ? 1 : 2; if( video_id || campaign_id ) { vp_os_vids[mejs_id] = new Array(); vp_os_vids[mejs_id]['player'] = player; vp_os_vids[mejs_id]['type'] = type; var actions = jQuery.extend(true, {}, vidprofits_get_video_actions( video_id, campaign_id, type )); vp_os_vids[mejs_id]['settings'] = actions; } return mejs_id; // console.log(vp_os_vids) } (function($) { // add mime-type aliases to MediaElement plugin support mejs.plugins.silverlight[0].types.push('video/x-ms-wmv'); mejs.plugins.silverlight[0].types.push('audio/x-ms-wma'); $(function() { vpfeatures = ['vidprofits', 'playpause', 'progress', 'duration', 'volume', 'fullscreen'] var settings = { features: vpfeatures, keyActions: [], success: function(media, node, player) { // TO-DO Asignar actions al player (si vienes de video id o de campaign id) // console.log('node'); // console.log(node); // console.log('media'); // console.log(media); // console.log('player'); // console.log(player); mejs_id = vidprofits_add_video_to_queue( player, media ); vidprofits_player_loaded( player, media ); // video_id = vidprofits_get_video_id(player); if (typeof vp_os_vids[mejs_id]['settings'] !== 'undefined') { // console.log('rmi353, pa que ?') vp_os_vids[mejs_id]['settings'].original_video = media.src; vp_os_vids[mejs_id]['settings'].player = player; } media.addEventListener('timeupdate', function(e) { vidprofits_time_update(player, media); }); media.addEventListener('ended', function(e) { vidprofits_player_ended(player, media); }); media.addEventListener('playing', function(e) { vidprofits_player_playing(player, media); }); /* media.addEventListener('canplay', function(e) { console.log('canplay') }); media.addEventListener('loadeddata', function(e) { console.log('loadeddata') });*/ media.addEventListener('loadedmetadata', function(e) { // console.log('loadedmetadata') // Update views for videoprofits theme var fn = window['vidprofitst_update_views']; if(typeof fn === 'function') vidprofitst_update_views( ); }); /*media.addEventListener('play', function(e) { console.log('play') }); media.addEventListener('loadedmetadata', function(e) { });*/ } }; if (vidprofits_video.is_pro == "1" && (vidprofits_video.logo_url != null) && (vidprofits_video.logo_url != '')) { logo_url = vidprofits_video.logo_url; settings.logo = { image: vidprofits_video.logo_url, link: '' } settings.features.unshift('logovk') } if (typeof _wpmejsSettings !== 'undefined') settings.pluginPath = _wpmejsSettings.pluginPath; var settings_horizontal = jQuery.extend(true, {}, settings); settings_horizontal.videoVolume = 'horizontal'; $('.wp-audio-shortcode:not(".vidprofits-volume-horizontal"), .wp-video-shortcode:not(".vidprofits-volume-horizontal")').mediaelementplayer(settings); $('.wp-audio-shortcode.vidprofits-volume-horizontal, .wp-video-shortcode.vidprofits-volume-horizontal').mediaelementplayer(settings_horizontal); }); }(jQuery)); (function($){ MediaElementPlayer.prototype.buildvidprofits = function(player, controls, layers, media){ post_id = media.attributes.id; html_string = ''; var loop = $(' ') .appendTo(layers) }; })(jQuery); function vidprofits_player_ended( player, media ) { // player_id = vidprofits_get_video_id( player ); // vsettings = vidprofits_get_video_settings_from_id( player_id ); is_campaign = vidprofits_is_campaign( player ) mejs_id = vidprofits_get_mejs_id( player ); if( VIDPROFITS_DEBUG ) console.log('video ended'); // if( typeof vidprofits_vsettings[player_id] === 'undefined' ) if( typeof vp_os_vids[mejs_id]['settings'] === 'undefined' ) return; end_actions = vidprofits_get_actions( mejs_id, VIDEO_ACTION_MOMENT_VIDEOEND, 0, is_campaign ); if ( !vp_os_vids[mejs_id]['settings'].playing_original ) { // no estaba reproduciendo el original, reproducirlo vp_os_vids[mejs_id]['settings'].playing_original = true; if( VIDPROFITS_DEBUG ) console.log('Finished secondary, back again to primary: '+vp_os_vids[mejs_id]['settings'].original_video) player.setSrc( vp_os_vids[mejs_id]['settings'].original_video ); extra_layer = vidprofits_get_extra_layer( player ); extra_layer.find('.mep_content .vidprofits-skip-video').hide(); player.load(); player.play(); return; } vp_os_vids[mejs_id]['settings'].playing_original = true; if( vp_os_vids[mejs_id]['settings'].playing_status == 1 ) { vp_os_vids[mejs_id]['settings'].playing_status = 2; vidprofits_add_video_finish_count( player_id ); } if ( !end_actions || end_actions.length == 0 ) { if( VIDPROFITS_DEBUG ) console.log('video ended, NO hay actions :-('); if( vp_os_vids[mejs_id]['settings'].do_loop == 1 || vp_os_vids[mejs_id]['settings'].do_loop == '1' || media.attributes.loop ) { player.load(); player.play(); } return; } else { if( VIDPROFITS_DEBUG ) console.log('video ended, hay actions'); vidprofits_do_actions( mejs_id, player, end_actions ); } } function vidprofits_player_started( player, media ) { // player_id = vidprofits_get_video_id( player ); // vsettings = vidprofits_get_video_settings_from_id( player_id ); is_campaign = vidprofits_is_campaign( player ) mejs_id = vidprofits_get_mejs_id( player ); // if( typeof vidprofits_vsettings[player_id] === 'undefined' ) if( typeof vp_os_vids[mejs_id]['settings'] === 'undefined' ) return; start_actions = vidprofits_get_actions( mejs_id, VIDEO_ACTION_MOMENT_VIDEOSTART, 0, is_campaign ); // if ( !vidprofits_vsettings[player_id].playing_original ) if ( !vp_os_vids[mejs_id]['settings'].playing_original ) return; if ( !start_actions || start_actions.length == 0 ) { if( VIDPROFITS_DEBUG ) console.log('video started, NO hay actions :-('); return; } else { if( VIDPROFITS_DEBUG ) console.log('video started, hay actions'); // vidprofits_do_actions( player, start_actions ); vidprofits_do_actions( mejs_id, player, start_actions ); } } function vidprofits_player_loaded( player, media ) { is_campaign = vidprofits_is_campaign( player ) mejs_id = vidprofits_get_mejs_id( player ); // vsettings = vidprofits_get_video_settings_from_id( mejs_id ); if( VIDPROFITS_DEBUG ) console.log('video loaded: '+mejs_id); start_actions = vidprofits_get_actions( mejs_id, VIDEO_ACTION_MOMENT_VIDEOLOAD, 0, is_campaign); // console.log(start_actions) /*if (is_campaign && ( typeof vidprofits_csettings !== 'undefined') && ( typeof vidprofits_csettings[player_id] === 'undefined' ) ) return; else if ( !is_campaign && (typeof vidprofits_vsettings[player_id] === 'undefined' || !vidprofits_vsettings[player_id].playing_original ) ) { return; }*/ if ( !start_actions || start_actions.length == 0 ) { if( VIDPROFITS_DEBUG ) console.log('video '+mejs_id+' loaded, NO hay actions :-('); return; } else { if( VIDPROFITS_DEBUG ) console.log('video '+mejs_id+' loaded, hay actions'); vidprofits_do_actions( mejs_id, player, start_actions ); } } function vidprofits_time_update( player, media ) { var time = Math.floor(media.currentTime); is_campaign = vidprofits_is_campaign( player ) mejs_id = vidprofits_get_mejs_id( player ); // console.log('time pudate') // player_id = vidprofits_get_video_id( player ); if (time == 0 && !media.paused) { vidprofits_player_started( player, media ); } else if( media.paused ) return; secondx_actions = vidprofits_get_actions( mejs_id, VIDEO_ACTION_MOMENT_AFTERSECS, time); if ( !secondx_actions || secondx_actions.length == 0 ) { return; } /*else if (vidprofits_vsettings[player_id].playing_original) { vidprofits_do_actions( mejs_id, player, secondx_actions ); }*/ else if ( vp_os_vids[mejs_id]['settings'].playing_original ) { vidprofits_do_actions( mejs_id, player, secondx_actions ); } } function vidprofits_player_playing( player, media ) { player_id = vidprofits_get_video_id( player ); // vsettings = vidprofits_get_video_settings_from_id( player_id ); mejs_id = vidprofits_get_mejs_id( player ); if( VIDPROFITS_DEBUG ) console.log('playing') // if( typeof vidprofits_vsettings[player_id] === 'undefined' ) if( typeof vp_os_vids[mejs_id] === 'undefined' ) return; /*if( !vidprofits_vsettings[player_id].playing_status ) { vidprofits_vsettings[player_id].playing_status = 1; vidprofits_add_video_play_count( player_id ); } if (vidprofits_vsettings[player_id].do_seek && vidprofits_vsettings[player_id].playing_original) { vidprofits_vsettings[player_id].do_seek = false; player.setCurrentTime(vidprofits_vsettings[player_id].current_time); player.setCurrentRail(); }*/ if( !vp_os_vids[mejs_id]['settings'].playing_status ) { vp_os_vids[mejs_id]['settings'].playing_status = 1; vidprofits_add_video_play_count( player_id ); } if (vp_os_vids[mejs_id]['settings'].do_seek && vp_os_vids[mejs_id]['settings'].playing_original) { vp_os_vids[mejs_id]['settings'].do_seek = false; player.setCurrentTime(vp_os_vids[mejs_id]['settings'].current_time); player.setCurrentRail(); } }; // source --> https://bestkitchenworks.com/wp-content/plugins/wp-video-profits/js/slick.min.js?ver=a2bb602fb9d4344dc7486080729daac0 /* _ _ _ _ ___| (_) ___| | __ (_)___ / __| | |/ __| |/ / | / __| \__ \ | | (__| < _ | \__ \ |___/_|_|\___|_|\_(_)/ |___/ |__/ Version: 1.6.0 Author: Ken Wheeler Website: http://kenwheeler.github.io Docs: http://kenwheeler.github.io/slick Repo: http://github.com/kenwheeler/slick Issues: http://github.com/kenwheeler/slick/issues */ !function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):"undefined"!=typeof exports?module.exports=a(require("jquery")):a(jQuery)}(function(a){"use strict";var b=window.Slick||{};b=function(){function c(c,d){var f,e=this;e.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:a(c),appendDots:a(c),arrows:!0,asNavFor:null,prevArrow:'',nextArrow:'',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(b,c){return a('').text(c+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},e.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},a.extend(e,e.initials),e.activeBreakpoint=null,e.animType=null,e.animProp=null,e.breakpoints=[],e.breakpointSettings=[],e.cssTransitions=!1,e.focussed=!1,e.interrupted=!1,e.hidden="hidden",e.paused=!0,e.positionProp=null,e.respondTo=null,e.rowCount=1,e.shouldClick=!0,e.$slider=a(c),e.$slidesCache=null,e.transformType=null,e.transitionType=null,e.visibilityChange="visibilitychange",e.windowWidth=0,e.windowTimer=null,f=a(c).data("slick")||{},e.options=a.extend({},e.defaults,d,f),e.currentSlide=e.options.initialSlide,e.originalSettings=e.options,"undefined"!=typeof document.mozHidden?(e.hidden="mozHidden",e.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(e.hidden="webkitHidden",e.visibilityChange="webkitvisibilitychange"),e.autoPlay=a.proxy(e.autoPlay,e),e.autoPlayClear=a.proxy(e.autoPlayClear,e),e.autoPlayIterator=a.proxy(e.autoPlayIterator,e),e.changeSlide=a.proxy(e.changeSlide,e),e.clickHandler=a.proxy(e.clickHandler,e),e.selectHandler=a.proxy(e.selectHandler,e),e.setPosition=a.proxy(e.setPosition,e),e.swipeHandler=a.proxy(e.swipeHandler,e),e.dragHandler=a.proxy(e.dragHandler,e),e.keyHandler=a.proxy(e.keyHandler,e),e.instanceUid=b++,e.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,e.registerBreakpoints(),e.init(!0)}var b=0;return c}(),b.prototype.activateADA=function(){var a=this;a.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},b.prototype.addSlide=b.prototype.slickAdd=function(b,c,d){var e=this;if("boolean"==typeof c)d=c,c=null;else if(0>c||c>=e.slideCount)return!1;e.unload(),"number"==typeof c?0===c&&0===e.$slides.length?a(b).appendTo(e.$slideTrack):d?a(b).insertBefore(e.$slides.eq(c)):a(b).insertAfter(e.$slides.eq(c)):d===!0?a(b).prependTo(e.$slideTrack):a(b).appendTo(e.$slideTrack),e.$slides=e.$slideTrack.children(this.options.slide),e.$slideTrack.children(this.options.slide).detach(),e.$slideTrack.append(e.$slides),e.$slides.each(function(b,c){a(c).attr("data-slick-index",b)}),e.$slidesCache=e.$slides,e.reinit()},b.prototype.animateHeight=function(){var a=this;if(1===a.options.slidesToShow&&a.options.adaptiveHeight===!0&&a.options.vertical===!1){var b=a.$slides.eq(a.currentSlide).outerHeight(!0);a.$list.animate({height:b},a.options.speed)}},b.prototype.animateSlide=function(b,c){var d={},e=this;e.animateHeight(),e.options.rtl===!0&&e.options.vertical===!1&&(b=-b),e.transformsEnabled===!1?e.options.vertical===!1?e.$slideTrack.animate({left:b},e.options.speed,e.options.easing,c):e.$slideTrack.animate({top:b},e.options.speed,e.options.easing,c):e.cssTransitions===!1?(e.options.rtl===!0&&(e.currentLeft=-e.currentLeft),a({animStart:e.currentLeft}).animate({animStart:b},{duration:e.options.speed,easing:e.options.easing,step:function(a){a=Math.ceil(a),e.options.vertical===!1?(d[e.animType]="translate("+a+"px, 0px)",e.$slideTrack.css(d)):(d[e.animType]="translate(0px,"+a+"px)",e.$slideTrack.css(d))},complete:function(){c&&c.call()}})):(e.applyTransition(),b=Math.ceil(b),e.options.vertical===!1?d[e.animType]="translate3d("+b+"px, 0px, 0px)":d[e.animType]="translate3d(0px,"+b+"px, 0px)",e.$slideTrack.css(d),c&&setTimeout(function(){e.disableTransition(),c.call()},e.options.speed))},b.prototype.getNavTarget=function(){var b=this,c=b.options.asNavFor;return c&&null!==c&&(c=a(c).not(b.$slider)),c},b.prototype.asNavFor=function(b){var c=this,d=c.getNavTarget();null!==d&&"object"==typeof d&&d.each(function(){var c=a(this).slick("getSlick");c.unslicked||c.slideHandler(b,!0)})},b.prototype.applyTransition=function(a){var b=this,c={};b.options.fade===!1?c[b.transitionType]=b.transformType+" "+b.options.speed+"ms "+b.options.cssEase:c[b.transitionType]="opacity "+b.options.speed+"ms "+b.options.cssEase,b.options.fade===!1?b.$slideTrack.css(c):b.$slides.eq(a).css(c)},b.prototype.autoPlay=function(){var a=this;a.autoPlayClear(),a.slideCount>a.options.slidesToShow&&(a.autoPlayTimer=setInterval(a.autoPlayIterator,a.options.autoplaySpeed))},b.prototype.autoPlayClear=function(){var a=this;a.autoPlayTimer&&clearInterval(a.autoPlayTimer)},b.prototype.autoPlayIterator=function(){var a=this,b=a.currentSlide+a.options.slidesToScroll;a.paused||a.interrupted||a.focussed||(a.options.infinite===!1&&(1===a.direction&&a.currentSlide+1===a.slideCount-1?a.direction=0:0===a.direction&&(b=a.currentSlide-a.options.slidesToScroll,a.currentSlide-1===0&&(a.direction=1))),a.slideHandler(b))},b.prototype.buildArrows=function(){var b=this;b.options.arrows===!0&&(b.$prevArrow=a(b.options.prevArrow).addClass("slick-arrow"),b.$nextArrow=a(b.options.nextArrow).addClass("slick-arrow"),b.slideCount>b.options.slidesToShow?(b.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),b.htmlExpr.test(b.options.prevArrow)&&b.$prevArrow.prependTo(b.options.appendArrows),b.htmlExpr.test(b.options.nextArrow)&&b.$nextArrow.appendTo(b.options.appendArrows),b.options.infinite!==!0&&b.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):b.$prevArrow.add(b.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},b.prototype.buildDots=function(){var c,d,b=this;if(b.options.dots===!0&&b.slideCount>b.options.slidesToShow){for(b.$slider.addClass("slick-dotted"),d=a("The requested content cannot be loaded.
Please try again later.